{% extends 'extend/default.html' %}
{% block title %}Excel in the box！{% endblock %}

{% block script %}
Ext.onReady(function(){
    var loginForm = new Ext.form.FormPanel({
        id: 'loginForm',
        region: 'center',
        width:400,
        height:90,
        labelWidth:40,
        bodyStyle: 'padding:20px 80px; margin-top:20px;',
        url: '/author/action_login/?lastUrl={{request.GET.lastUrl}}',
        keys:{
            key: Ext.EventObject.ENTER,
            fn: EU.formSubmitBridge.createCallback({
                form: 'loginForm',
                mask:{body: 'loginWindow'}
            })
        },
        items:[
            {xtype:'textfield',width:180, name:'username', fieldLabel:'帐&nbsp;&nbsp;号'},
            {xtype:'textfield',width:180, name:'password', fieldLabel:'密&nbsp;&nbsp;码',inputType:'password'}
        ]
    });
    
    var loginWindow = new Ext.Window({
        id:'loginWindow',
        title:'后台入口  -- Excel in the box！ ',
        autoWidth: true,
        draggable: false,
        closable: false,
        resizable: false,
        autoHeight: true,
        bodyStyle: 'padding:20px 60px;',
        modal: true,
        items:[loginForm],
        buttonAlign:'center',
        buttons:[{
            text:'登录',
            handler:EU.formSubmitBridge.createCallback({
                    form: 'loginForm',
                    mask:{body: 'loginWindow'}
            })
        }]
    });
    loginWindow.show();
});
{% endblock %}